<template>
    <div>
        <!-- auto 滚动下一张图片的时间-->
        <mt-swipe :auto="3000" :style="{'height': height }">
            <mt-swipe-item v-for="item in dataItem" :key="item.img_url">
                <img :src="item.img_url" alt :class="{'full': isfull}" />
            </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
export default {
    props: {
        dataItem: { type: Array, default: () => [] },
        // 宽度是 100% 还是 自适应
        isfull: { type: Boolean, default: true },
        height: { type: String, default: "200px"},
    }
}
</script>

<style lang="scss" scoped>
.mint-swipe {
    .mint-swipe-item {
        text-align: center;
        img {
            // width: 100%;
            height: 100%;
        }
    }
}
.full {
    width: 100%;
}
</style>